home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / a / amiga_vision_professional / amigavisionprofessiv2.04a.dms / in.adf / AV_Help / Module.english < prev    next >
Encoding:
Text File  |  1992-12-01  |  13.8 KB  |  122 lines

  1. |01 Module
  2.  
  3. The |BModule|B icon is the primary way to group other icons. The |BModule|B icon serves as the parent for other icons and can also define "local" variables that will remain active within the module.
  4.  
  5. The |HDelete|H, |HInsert|H and |HMove|H gadgets are used to arrange expressions that define local variables in the window to the left of these gadgets. When you click on |HInsert|H, the |BExpression Editor|B is presented for you to define variable expressions. Here you can define one or more variables. All definitions are assumed to be new variables. When you exit the |BExpression Editor|B by clicking on |HOK|H, the expressions will appear in the window in the |HModule|H requester.
  6.  
  7. To insert expressions in a particular place in the list of existing expressions in the window, click on the expression below the line where you wish to insert the new expression and click on |HInsert|H.
  8.  
  9. To delete a variable definition from the list, click on the expression defining the variable displayed inside the window. Then click on |HDelete|H.
  10.  
  11. To move an expression elsewhere in the list, click on it and then click on the |HMove|H gadget. To move an expression above its original position, click on the expression above the line where you want to move it to. Similarly, to move an expression below its original position, click on the expression below the line where you want to move it to.
  12.  
  13. Double-clicking on an expression presents the variable and the associated expression in the |BExpression Editor|B for editing.
  14.  
  15.  
  16. |02 Subroutine
  17.  
  18. The |BSubroutine|B icon is used to group icons that represent frequently used procedures. It can be called from multiple locations by the main presentation using the |BCall|B icon. It is also useful in defining "local" variables that are valid only within the subroutine.
  19.  
  20. The |HDelete|H, |HInsert|H and |HMove|H gadgets in the requester are used to arrange expressions in the expressions window to the left. When you click on |HInsert|H, the |BExpression Editor|B is presented and you may define variables. When you exit the |BExpression Editor|B by clicking on |HOK|H, the expressions will appear in the expressions window.
  21.  
  22. To insert expressions in a particular place in the list of existing expressions in the window, click on the expression below the line where you wish to insert and click on the |HInsert|H gadget.
  23.  
  24. To delete an expression from the list, click on the expression. Then click on the |HDelete|H gadget.
  25.  
  26. To move an expression elsewhere in the list, click on the expression. Then click on the |HMove|H gadget. To move an expression above its original position, click on the expression above the line where you want to move it to. To move an expression below its original position, click on the expression below the line where you want to move it to.
  27.  
  28. Double-clicking on an expression presents it in the |BExpression Editor|B for editing.
  29.  
  30. Frequently, you may call a subroutine from a point in the application flow which has a screen background along with display objects that were placed on the background by various icons. If your subroutine modifies the screen, be sure to return the screen to its original state when the subroutine is completed. You can do this by storing the background image filename in a variable and using it inside the subroutine for returning the screen to its state at which the subroutine was called.
  31.  
  32. In the case of display objects that are on the screen at the time the subroutine was called, you can use the multistate gadget to either not remove or temporarily remove all of them. Temporarily means that the objects will be removed until the subroutine is completed and they will then be reactivated.
  33.  
  34.  
  35. |03 Quit
  36.  
  37. The |BQuit|B icon ends the presentation or course. It returns the user to either the |IAmigaVision|I Editor or Workbench screen depending on how the application was started. If it was started from the Flow Editor, it will return control to the Flow Editor. Alternatively, if the application was started from its icon, then control will be returned to Workbench.
  38.  
  39.  
  40. |04 Return
  41.  
  42. The |BReturn|B icon is used in conjunction with the |BSubroutine|B icon. When the |BReturn|B icon is encountered, the application exits the subroutine and continues with the icon following the |BCall|B icon in the outline which called the subroutine.
  43.  
  44. If no |BReturn|B is placed as a child to the |BSubroutine|B, the |BSubroutine|B will execute completely and then automatically return to the icon following the |BCall|B icon.
  45.  
  46. As one example, you may want to place the |BReturn|B inside a |BSubroutine|B as a partner to a conditional icon. If the condition is |Itrue|I, the |BReturn|B will be executed. If the condition is |Ifalse|I, the |BSubroutine|B will continue executing.
  47.  
  48. If a |BReturn|B icon is encountered and there has been no |BCall|B, the application will exit as if it encountered a |BQuit|B icon. You have to be careful in the design of your application to be sure that a subroutine is not executed except by a |BCall|B icon. For instance, if you have a |BModule|B icon followed by a |BSubroutine|B icon without a |BQuit|B icon in between the two, the subroutine will be executed as if it were another module and the application will exit if it encounters a |BReturn|B icon.
  49.  
  50.  
  51. |05 Execute
  52.  
  53. The |BExecute|B icon is used to call programs external to |IAmigaVision|I. You can use it to allow the user to open a text editor or a paint program, or to call a supplemental program for your presentation. It also lets you launch an ARexx script if you want to have another program exchanging information with |IAmigaVision|I. Or you can use the |BExecute|B icon to chain |IAmigaVision|I flows together.
  54.  
  55. The |HDirectory|H gadget opens the file requester where you specify the filename of the external program. You may also click on the |HFilename|H field and type in the name of the file to be referenced.
  56.  
  57. You must specify the screen to be displayed while the external program is executing. The choices are |HCustom|H and |HWorkbench|H. Select the Custom option if the external program uses a custom screen. If not, you should choose the Workbench option. These two options help |IAmigaVision|I manage the display screens properly. For instance, if your external program runs on the Workbench screen, then |IAmigaVision|I will display the Workbench screen and move the |IAmigaVision|I application screen to the background so that it is hidden from the viewer. Also, if the external program does not need any screen, set to |HCustom|H screen. This will keep the |IAmigaVision|I screen visible.
  58.  
  59. You must also specify the mode of program execution. The Mode options are |HWorkbench|H, |HARexx|H, |HCLI|H and |HAVf|H.
  60.  
  61. The |HWorkbench|H option assumes that the external program will be loaded into memory from the Workbench by simulating the double-click of left mouse button on the Workbench icon. Sometimes a program has options that can be set within the Tool Types field of its icon (to set graphics mode, default settings, etc.). Using the Workbench option allows you to take advantage of this.
  62.  
  63. The |HARexx|H mode indicates that you are executing an ARexx script. An important note: the ARexx interpreter |Imust|I be active before you can send any scripts to it. If ARexx is not active, any |BExecute|B icons in |HARexx|H mode will be ignored.
  64.  
  65. The |HARexx|H mode allows you to select variables for saving the Return Code and Result values returned by ARexx. The Return Code (RetVal) indicates how successful ARexx was at executing your script. Please refer to the ARexx User's Reference Manual for the meaning of the Return Codes. The Result is the value that the ARexx itself is returning to |IAmigaVision|I. Please refer to Appendix B for more information about |IAmigaVision's|I ARexx interface.
  66.  
  67. The |HCLI|H option executes the commands in the string gadget as if they were typed directly into a CLI window. Note that you must state an explicit path to the CLI commands. This means you can also include command line settings in the string.
  68.  
  69. The fourth mode is the 'AVf Application' mode. When this setting is selected, the Screen selector is forced to 'AV Screen' and the third multistate gadget is enabled to allow selection of the operation mode, either 'Call Mode' or "Link Mode'.
  70.  
  71. |HCall|H mode is really a means of creating disk-based |IAmigaVision|I subroutines. When the |BExecute|B icon is evaluated, the AVf file specified is loaded into memory and executed. When the flow terminates (without encountering a |BQuit|B icon) the memory used by the second flow is freed, and the original flow restarts at the icon immediately after the |BExecute|B icon. As with normal subroutines, any interrupts added before the |BExecute|B icon are available while the chaining is in operation. Also, any variables defined before the |BExecute|B icon are available for use or modification by the chained flow, they will remain after the chaining is completed, and may be used in the calling flow.
  72.  
  73. |HLink|H mode allows the same ability to fragment applications into smaller pieces, but does not allow for the 'Subroutine' nature of the |HCall|H mode.
  74.  
  75. When a linking operation starts, the memory for the first flow is freed immediately, and when the last linked flow terminates, the presentation terminates completely. This allows a means of stepping through multiple flows during the execution of any application.
  76.  
  77. When the linking operation is started, several things occur which differ from the |HCall|H mode. First,any variables currently defined are turned into global variables for the new flow segment. Thus, as far as variable creation is concerned, the parent flow is seen by the child as simply a |BVariables|B icon which has given it a group of variables. Second, any display objects on the screen at the time the linking is started will be removed, with only the background image remaining.
  78.  
  79.  
  80. |06 Timer
  81.  
  82. The |BTimer|B is like a stopwatch. When started, it begins counting elapsed time. When you stop the timer, it retains the elapsed time. If you restart the timer again, it continues counting from where it left off. If you want it to start counting from zero again, then you must choose the |HStart|H option instead of |HRestart|H.
  83.  
  84. You may have up to nine timers running simultaneously. They are identified by numbers from 1 to 9. You may start, stop and restart the timers as necessary. 
  85.  
  86. Each of the nine possible timers is identified by a number. You can read the value of a specific timer into a variable by using the |Itimer(n)|I function in the |BExpression Editor|B. This function returns elapsed time of a specific timer number in seconds.
  87.  
  88. In general it is a good practice to use |H>=|H or |H<=|H rather than |H==|H in testing the timer condition, as the timer is not updated at every second and it may miss the value while sampling around it. For instance, if you state a conditional expression:
  89.  
  90.          |Itimer(1) == 10.00|I
  91.  
  92. then the condition might never be True as the timer clock may jump from 9.95 seconds to 10.01 seconds and miss the 10.00 second mark entirely. Thus it is prudent to use the >= or <= tests when you state conditions using the timers.
  93.  
  94. Click on the |HStart from Zero/Stop/Restart|H multistate gadget to select the appropriate action. Click on the |HTimer #|H gadget to enter the number of the timer being used.
  95.  
  96.  
  97. |07 Resource Control
  98.  
  99. The |BResource Control|B icon allows you to preload files containing pictures, digitized sounds, animations, music, instruments and ASCII text into memory for quick use later in the presentation. The |BResource Control|B icon also allows you to remove loaded files from memory when they are no longer needed. The preloading of useful resources generally requires memory of at least 3 megabytes or it will create constraints in presenting applications.
  100.  
  101. When you click on the |HDirectory|H gadget, the file requester is displayed. Here you may specify the volume, drawer and name of the resource files. If you want this file to be entered into the resource file list, then click on the |HInsert|H gadget to the right of the window.
  102.  
  103. To insert a resource in a particular place in the list of existing resources in the window, click on the resource below the line where you wish to insert it. Then, click on |HInsert|H to place the resource from the Directory field into the Resource Window.
  104.  
  105. To delete a resource from the list, click on the resource. Then click on |HDelete|H. 
  106.  
  107. To move a resource elsewhere in the list, click on the resource. Click on |HMove|H. To move a resource above its original position, click on the resource above which you want to move. To move a resource below its original position, click on the resource below the line where you want to move it to.
  108.  
  109. Select the |HPause|H button to cause the application to wait until the files are loaded before executing the next icon. 
  110.  
  111. Select the action by clicking on the |HLoad/Unload Files|H multistate gadget. Usually when you need to unload previously loaded files, you can simply use the |HCopy|H feature from the |HEdit|H pull-down menu and copy the |BResource|B icon that was used to load the files. Selectively delete the files that you do not want removed from memory and then select the |HUnload|H option. This saves you the labor of specifying each of the files to be unloaded.
  112.  
  113.  
  114. |08 Content Folder
  115.  
  116. The |BContent Folder|B may contain any number of |Haudiovisual|H icons. Its principal use is for organizing audiovisual information in a hierarchical manner. If a picture or sound is likely to be used in many different applications, then it is handy to have an archive using the content files.
  117.  
  118. Use the |BContent Folder|B to organize and store commonly used graphics, animations, digitized sounds, music, text for speech, text for display and videodisc segments for easy insertion into your presentations. When you create a new application you can simply copy various elements from your content files.
  119.  
  120. Just as with the Flow Window, you can move, copy, preview and save audiovisual content icons. But you cannot specify logic using control structures or any icons other than audiovisual icons.
  121.  
  122.